package com.think.service.model;

import org.springframework.http.HttpStatus;

public class ResultModel {
    private String code;
    private String msg;
    private Object data;

    public ResultModel() {
        this.code = HttpStatus.OK.getReasonPhrase();
    }

    public ResultModel(String msg) {
        this.msg = msg;
        this.code = HttpStatus.INTERNAL_SERVER_ERROR.getReasonPhrase();
    }

    public ResultModel(Object data) {
        this.code = HttpStatus.OK.getReasonPhrase();
        this.data = data;
    }

    public ResultModel(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public ResultModel(String code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
